package collection;

import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;

public class CopyDemo2 {
    public static void main(String[] args) throws IOException {
        FileInputStream fis = new FileInputStream("猴子看海.pptx");
        FileOutputStream fos = new FileOutputStream("猴子看海4.pptx");
        long start = System.currentTimeMillis();//获取当前系统时间
        byte[] data = new byte[4];//块读的字节:10kb
        int len=0;
        while((len = fis.read(data)) != -1){
            fos.write(data);
        }
        long end = System.currentTimeMillis();//获取当前系统时间
        System.out.println("复制完毕!耗时:"+(end-start)+"ms");
        fis.close();
        fos.close();


    }
}
